Skip to content

riscv-rt: Add __post_init Rust function #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2025
Merged

riscv-rt: Add __post_init Rust function #328

merged 1 commit into from
Jul 11, 2025

Conversation

romancardenas
Copy link
Contributor

Inspired by esp-riscv-rt. It includes a __post_init Rust function to perform initialization actions safely from Rust.

The new __post_init function is optional and feature-gated. If enabled, no default symbol is provided, and users must include this function. They can use the new #[riscv_rt::post_init] attribute macro. I included trybuild tests.

@romancardenas romancardenas requested a review from a team as a code owner July 8, 2025 18:06
Copy link
Contributor

@rmsyn rmsyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small question, but LGTM overall.

Thanks for adding the trybuild tests!

@romancardenas romancardenas added this pull request to the merge queue Jul 11, 2025
Merged via the queue into master with commit 9468182 Jul 11, 2025
139 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants